package com.warren.entity.vo;

import lombok.Getter;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.Valid;
import javax.validation.constraints.*;
import java.io.Serializable;

/**
 * @author warren
 * @create 2022-03-24
 */
@Getter
public class UserParam implements Serializable {
    private static final long serialVersionUID = 1L;

    @NotNull(message = "{could.no.be.empty}")
    @Range(min = 0, max = 1, message = "sex should be 0-1")
    private Integer userId;

    @NotNull(message = "could not be empty")
    private String userName;

//    @NotEmpty(message = "could not be empty")
//    @Email(message = "invalid email")
//    private String email;
//
//    @NotEmpty(message = "could not be empty")
//    @Pattern(regexp = "^(\\\\d{6})(\\\\d{4})(\\\\d{2})(\\\\d{2})(\\\\d{3})([0-9]|X)$", message = "invalid ID")
//    private String cardNo;
//
//    @NotEmpty(message = "could not be empty")
//    @Length(min = 1, max = 10, message = "nick name should be 1-10")
//    private String nickName;
//
//    @NotEmpty(message = "could not be empty")
//    @Range(min = 0, max = 1, message = "sex should be 0-1")
//    private int sex;
//
//    @Max(value = 100, message = "please input valid age")
//    private int age;

//    @Valid
//    private AddressParam address;
}
